package edu.ccut.saturn.manager.bundles.core;

import java.io.File;

import edu.ccut.saturn.component.DefaultComponent;
import edu.ccut.saturn.component.IParameterContext;

public class DelFile extends DefaultComponent {
	@Override
	public void execute(IParameterContext parameterContext) throws Exception {
		
		String filePath = parameterContext.getParameterValue(0).toString();
		
		File file = new File(filePath);
		
		if(file.exists()){
			file.delete();
		}
		
		String uploadFail = "true";
		
		parameterContext.setParameter(1, uploadFail);
	}
}